The present invention relates to the field of computer graphics. Many computer graphic images are created by mathematically modeling the interaction of light with a three dimensional scene from a given viewpoint. This process, called rendering, generates a two-dimensional image of the scene from the given viewpoint, and is analogous to taking a photograph of a real-world scene.
As the demand for computer graphics, and in particular for real-time computer graphics, has increased, computer systems with graphics processing subsystems adapted to accelerate the rendering process have become widespread. In these computer systems, the rendering process is divided between a computer's general purpose central processing unit (CPU) and the graphics processing subsystem. Typically, the CPU performs high level operations, such as determining the position, motion, and collision of objects in a given scene. From these high level operations, the CPU generates a set of rendering commands and data defining the desired rendered image or images. For example, rendering commands and data can define scene geometry, lighting, shading, texturing, motion, and/or camera parameters for a scene. The graphics processing subsystem creates one or more rendered images from the set of rendering commands and data.
To maximize rendering performance, the graphics processing subsystem may include two or more graphics processing units (GPUs) operating in parallel. The graphics processing units can divide the rendering workload in a number of different ways. For example, different portions of an image can be rendered in parallel by different GPUs. The portions are then combined to produce a complete rendered image. In another example parallel rendering scheme, each GPU renders one image in a sequence of images.
Programming multiple GPUs with a CPU is one difficulty arising from parallel rendering schemes. In parallel rendering schemes, GPUs require a mixture of rendering commands common to all of the GPUs in the graphics processing subsystem and rendering commands specific to each GPU. However, programming each GPU with different rendering commands and data often requires a large allocation of system resources for each GPU. This programming overhead makes parallel rendering schemes inefficient and in some cases even limits the total number of GPUs that can be used by the graphics processing subsystem.
Therefore, it is desirable to have an efficient system and method for programming multiple graphics processing units with rendering commands while consuming a minimal amount of system resources. It is further desirable to be able to program multiple graphics processing units with both rendering commands common to all of the graphics processing units and rendering commands specific to one or more graphics processing units.